import request from "@/plugins/request";

// 账号密码登录
export function AccountPwdLogin(data={}) {
  return request({
    url: "/login/accountPwdLogin",
    method: "post",
    data,
  });
}

// 验证码登陆
export function SmsCodeLogin(data={}) {
    return request({
      url: "/login/smsCodeLogin",
      method: "post",
      data,
    });
  }
  
  // 退出
  export function LoginOut(data={}) {
    return request({
      url: "/login/loginOut",
      method: "post",
      data,
    });
  }
  
// 获取通知渠道
export function GetNoticeType(data={}) {
  return request({
    url: "/global/enum/select/getNoticeType",
    method: "post",
    data,
  });
}

// 获取审核状态
export function GetAuditStatus(data={}) {
  return request({
    url: "/global/enum/select/getAuditStatus",
    method: "post",
    data,
  });
}

// 获取账号状态
export function GetAccountStatus(data={}) {
  return request({
    url: "/global/enum/select/getAccountStatus",
    method: "post",
    data,
  });
}

// 获取公司级别
export function GetCompanyLv(data={}) {
  return request({
    url: "/global/enum/select/getCompanyLv",
    method: "post",
    data,
  });
}

// 获取查找数据范围
export function GetFindDataScope(data={}) {
  return request({
    url: "/global/enum/select/getFindDataScope",
    method: "post",
    data,
  });
}

// 上传单个文件
export function SingleFileUpload(data={}) {
  return request({
    url: "/global/base/app/singleFileUpload",
    method: "post",
    data,
  });
}

// 单文件下载
export function FileldDownload(params) {
  return request({
    url: "/global/base/app/download",
    method: "get",
    params,
  });
}

// 单文件下载
export function FilePreview(params) {
  return request({
    url: "/global/base/app/preview",
    method: "get",
    params,
  });
}

// 发送短信验证码
export function SendVerifyMobileSms(data={}) {
  return request({
    url: "/global/base/sendVerifyMobileSms",
    method: "post",
    data,
  });
}

// 验证用户的验证码是否正确
export function verifyMobileSms(data={}) {
  return request({
    url: "/global/base/verifyMobileSms",
    method: "post",
    data,
  });
}

// 获取滑块验证码
export function getSlideVerifyImage(data={}) {
  return request({
    url: "/global/base/getSlideVerifyImage",
    method: "post",
    data,
  });
}

// 验证滑块位置
export function ValidSlideVerifyImage(data={}) {
  return request({
    url: "/global/base/validSlideVerifyImage",
    method: "post",
    data,
  });
}
// 获取省市区
export function getNationAreaByParentId(data={}) {
  return request({
    url: "/global/base/getNationAreaByParentId",
    method: "post",
    data,
  });
}

// 获取上级组织（所有公司）
export function getCompanyList(data={}) {
  return request({
    url: "/platform/company/getCompanyList",
    method: "post",
    data,
  });
}

// 获取字典表数据
export function GetDict(data={}) {
  return request({
    url: "/global/base/getDictByParentId",
    method: "post",
    data,
  });
}

// 获取我的信息
export function getMyInfo(data={}) {
  return request({
    url: "/platform/my/getMyInfo",
    method: "post",
    data,
  });
}
// 根据经纬度查地址
export function getPlaceByLocation() {
  return request({
    url: "/global/map/getPlaceByLocation",
    method: "post",
    data,
  });
}